package com.quan.api.oms;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.quan.commons.core.bean.R;
import com.quan.commons.core.biz.support.MyBaseController;
import com.quan.mall.commons.vo.OmsOrderGoodsVo;
import com.quan.mall.entity.OmsOrderGoods;
import com.quan.mall.service.OmsOrderGoodsService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 订单-商品表
 * @author yhaoquan
 * @email yhaoquan@163.com
 * @date 2021-03-09 17:22:38
 */
@Slf4j
@Api(tags = "订单-商品表")
@RestController
@RequestMapping("/api/mall/omsordergoods")
public class ApiOmsOrderGoodsController extends MyBaseController {

    @Autowired
    private OmsOrderGoodsService service;

    /**
     * 多条件查询信息详情
     * @param vo
     * @return
     */
    @GetMapping("/info")
    public R info(OmsOrderGoodsVo vo) {
        QueryWrapper<OmsOrderGoods> queryWrapper = new QueryWrapper<OmsOrderGoods>(vo);
        OmsOrderGoods omsOrderGoods = this.service.getOne(queryWrapper);
        return R.ok().put("data", omsOrderGoods);
    }


}
